|
|
|
|
<modbusSession>.SendRawFrame (Function) In french: <modbusSession>.EnvoieTrameBrute Sends a raw frame to a Modbus slave. This enables communication with devices that do not strictly comply with the Modbus standard. New in version 2024
mb is modbusSession = ModbusConnectTCP("localhost",502)
IF ErrorOccurred THEN
Error(ErrorInfo(errFullDetails))
RETURN
END
mb.SlaveID = 0x01
buff is Buffer = [0x03, 0x00, 0x01, 0x00, 0x01]
buffReponse is Buffer = mb.SendRawFrame(buff)
IF ErrorOccurred THEN
Error(ErrorInfo(errFullDetails))
RETURN
END
Syntax
<Result> = <Session>.ModbusSendRawFrame(<Frame>)
<Result>: Buffer Raw response from the slave. <Session>: modbusSession variable Name of the modbusSession variable that corresponds to the communication session with the Modbus slave. <Frame>: Buffer Frame to send to the slave. This frame must contain the function code and the data. The slave ID is specified via the SlaveID property of the modbusSession variable. WINDEV automatically adds the other elements of the Modbus frame (for example, the CRC or the transaction ID). Remarks You can use the ErrorOccurred variable after the call to this function to determine if an error has occurred.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|